capture log close
set more off
clear all

* Set file path to replication folder here
global user="/Users/elies/Dropbox/Climate fairness/06 Empirics/05 DCP data/07 Replication NComms"

cd "$user"
global data="$user/02 Data"
global output="$user/03 Results"
cd "$user/01 Code/"

*=============================================================================

* Load pooled data
use "$data/pooled_scenlevel_touse.dta"
order caseid conjoint scenario *_cj
tab country
tab conjoint_path
tab conjoint_shownprofiles country
tab conjoint_shownprofiles country if conjoint_path==1

* Keep only double conjoints and timing conjoint
keep if conjoint_shownprofiles==2
keep if conjoint_path==1
tab conjoint_path country

* Redefine cost labels for conjoint cost level attribute
label list
lab define hhcsts_num_lab 1 "€28, €39, £15, $53" ///
2 "€56, €77, £30, $107" ///
3 "€113, €154, £60, $213" ///
4 "€141, €193, £75, $267" 
label values own_hhcsts_cj hhcsts_num_lab
label values other_hhcsts_cj hhcsts_num_lab

* Interactions between own and other costs
gen own_cmed = own_hhcsts_med
gen own_chigh = own_hhcsts_high
gen own_cvhigh = own_hhcsts_vhigh
gen other_cmed = other_hhcsts_med
gen other_chigh = other_hhcsts_high
gen other_cvhigh = other_hhcsts_vhigh
foreach X in own_cmed own_chigh own_cvhigh{
	foreach Y in other_cmed other_chigh other_cvhigh{
	gen `X'X`Y'=`X'*`Y'	
	}
}

* Generate thresholded effectiveness rating
su effrting_cj, det
gen D_effrting_cj=.
replace D_effrting_cj=0 if effrting_cj<=`r(p50)'
replace D_effrting_cj=1 if effrting_cj>`r(p50)' & effrting_cj!=.

*** Weights
svyset caseid [pweight=mbweight]

* Missing weights
bysort country: mdesc mbweight

*=============================================================================

*** Overall conjoint results

* Figure 3
eststo main1: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
, robust

coefplot (main1, ///
drop(_cons ) ///
levels(99 95) mcolor(navy*.9) ciopts(lcolor(navy*.5 navy*.5) lwidth(*1 *2))) ///
,  ///
headings(1.own_cstpth_cj="Cost Path: Own" ///
1.other_cstpth_cj="Cost Path: Others" ///
1.own_hhcsts_cj="Cost Level: Own" ///
1.other_hhcsts_cj="Cost Level: Others" ///
1.own_mitig_cj_5levels="Investment: Mitigation: Own" ///
1.other_mitig_cj_5levels="Investment: Mitigation: Others" ///
,labsize(small)) ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(small) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small))
graph export "$output/Fig3.pdf", replace


* Supplementary Figure 6 (unweighted version)
eststo main1: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
, robust

coefplot (main1, ///
drop(_cons ) ///
levels(99 95) mcolor(navy*.9) ciopts(lcolor(navy*.5 navy*.5) lwidth(*1 *2))) ///
,  ///
headings(1.own_cstpth_cj="Cost Path: Own" ///
1.other_cstpth_cj="Cost Path: Others" ///
1.own_hhcsts_cj="Cost Level: Own" ///
1.other_hhcsts_cj="Cost Level: Others" ///
1.own_mitig_cj_5levels="Investment: Mitigation: Own" ///
1.other_mitig_cj_5levels="Investment: Mitigation: Others" ///
,labsize(small)) ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(small) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small))
graph export "$output/SuppFig6.pdf", replace


* Supplementary Figure 7 (by country)

eststo us: regress choice_cj100 ///
i.own_hhcsts_cj i.other_hhcsts_cj ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 1 ///
, robust
coefplot (us, ///
drop(_cons ) ///
levels(95) mcolor(dknavy*.6) ciopts(lcolor(dknavy*.6 dknavy*.5) lwidth(*1 *2))) ///
,  ///
headings(1.own_cstpth_cj="Cost Path: Own" ///
1.other_cstpth_cj="Cost Path: Others" ///
1.own_hhcsts_cj="Cost Level: Own" ///
1.other_hhcsts_cj="Cost Level: Others" ///
1.own_mitig_cj_5levels="Investment: Mitigation: Own" ///
1.other_mitig_cj_5levels="Investment: Mitigation: Others" ///
,labsize(small)) ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(small) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xtitle("Change in Pr(Chosen) in percentage points", size(small)) ///
title("United States") ///
name(USw)

eststo uk: regress choice_cj100 ///
i.own_hhcsts_cj i.other_hhcsts_cj ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 2 ///
, robust
coefplot (uk, ///
drop(_cons ) ///
levels(95) mcolor(dknavy*.6) ciopts(lcolor(dknavy*.6 dknavy*.5) lwidth(*1 *2))) ///
,  ///
headings(1.own_cstpth_cj="Cost Path: Own" ///
1.other_cstpth_cj="Cost Path: Others" ///
1.own_hhcsts_cj="Cost Level: Own" ///
1.other_hhcsts_cj="Cost Level: Others" ///
1.own_mitig_cj_5levels="Investment: Mitigation: Own" ///
1.other_mitig_cj_5levels="Investment: Mitigation: Others" ///
,labsize(small)) ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(small) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xtitle("Change in Pr(Chosen) in percentage points", size(small)) ///
title("United Kingdom") ///
name(UKw)

eststo ge: regress choice_cj100 ///
i.own_hhcsts_cj i.other_hhcsts_cj ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 3 ///
, robust
coefplot (ge, ///
drop(_cons ) ///
levels(95) mcolor(dknavy*.6) ciopts(lcolor(dknavy*.6 dknavy*.5) lwidth(*1 *2))) ///
,  ///
headings(1.own_cstpth_cj="Cost Path: Own" ///
1.other_cstpth_cj="Cost Path: Others" ///
1.own_hhcsts_cj="Cost Level: Own" ///
1.other_hhcsts_cj="Cost Level: Others" ///
1.own_mitig_cj_5levels="Investment: Mitigation: Own" ///
1.other_mitig_cj_5levels="Investment: Mitigation: Others" ///
,labsize(small)) ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(small) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xtitle("Change in Pr(Chosen) in percentage points", size(small)) ///
title("Germany") ///
name(GEw)

eststo fr: regress choice_cj100 ///
i.own_hhcsts_cj i.other_hhcsts_cj ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 4 ///
, robust
coefplot (fr, ///
drop(_cons ) ///
levels(95) mcolor(dknavy*.6) ciopts(lcolor(dknavy*.6 dknavy*.5) lwidth(*1 *2))) ///
,  ///
headings(1.own_cstpth_cj="Cost Path: Own" ///
1.other_cstpth_cj="Cost Path: Others" ///
1.own_hhcsts_cj="Cost Level: Own" ///
1.other_hhcsts_cj="Cost Level: Others" ///
1.own_mitig_cj_5levels="Investment: Mitigation: Own" ///
1.other_mitig_cj_5levels="Investment: Mitigation: Others" ///
,labsize(small)) ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(small) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xtitle("Change in Pr(Chosen) in percentage points", size(small)) ///
title("France") ///
name(FRw)

graph combine USw UKw GEw FRw, rows(2) altshrink graphregion(margin(zero) fcolor(white))
graph export "$output/SuppFig7.pdf", replace


*=============================================================================

*** Effect of costs by others' costs

* Figure 4a

eststo mit1: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==1 ///
 ,robust

gen low_low = _b[2.own_hhcsts_cj]
gen low_med = _b[3.own_hhcsts_cj]
gen low_high = _b[4.own_hhcsts_cj]

eststo mit2: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==2 ///
, robust

eststo mit3: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==3 ///
, robust

eststo mit4: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==4 ///
, robust
gen high_low = _b[2.own_hhcsts_cj]
gen high_med = _b[3.own_hhcsts_cj]
gen high_high = _b[4.own_hhcsts_cj]


local lw1="*2.5"
local lw2="*2.5"
local ms="*.5"

local dropvars="_cons 0.own_cstpth_cj 1.own_cstpth_cj 2.own_cstpth_cj 3.own_cstpth_cj 0.other_cstpth_cj 1.other_cstpth_cj 2.other_cstpth_cj 3.other_cstpth_cj 0.own_mitig_cj_5levels 1.own_mitig_cj_5levels 2.own_mitig_cj_5levels 3.own_mitig_cj_5levels 4.own_mitig_cj_5levels 5.own_mitig_cj_5levels 0.other_mitig_cj_5levels 1.other_mitig_cj_5levels 2.other_mitig_cj_5levels 3.other_mitig_cj_5levels 4.other_mitig_cj_5levels 5.other_mitig_cj_5levels"

* Effects plot
coefplot (mit1, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(ebblue*.85) ciopts(lcolor(ebblue*.5 ebblue*.5) lwidth(`lw1' `lw2'))) ///
(mit2, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(purple*.85) ciopts(lcolor(purple*.5 purple*.5) lwidth(`lw1' `lw2'))) ///
(mit3, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(red*.85) ciopts(lcolor(red*.5 red*.5) lwidth(`lw1' `lw2'))) ///
(mit4, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(orange*.85) ciopts(lcolor(orange*.5 orange*.5) lwidth(`lw1' `lw2'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(order(2 "Very Low" 4 "Low" 6 "High" 8 "Very High") rows(1) ///
subtitle("Cost Level: Other")) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small)) ///
addplot(line @at @b if @b == low_low | @b == high_low, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_med | @b == high_med, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_high | @b == high_high, ///
lcolor(dknavy*.8) lpattern(shortdash)) ///
note("(a) Effects of Own Cost, Conditional on Other Costs") ///
name(Fig4a)

* Supplementary Figure 8a (unweighted version)

eststo mit1_nw: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
if other_hhcsts_cj==1 ///
 ,robust

gen low_low_nw = _b[2.own_hhcsts_cj]
gen low_med_nw = _b[3.own_hhcsts_cj]
gen low_high_nw = _b[4.own_hhcsts_cj]

eststo mit2_nw: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
if other_hhcsts_cj==2 ///
, robust

eststo mit3_nw: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
if other_hhcsts_cj==3 ///
, robust

eststo mit4_nw: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
if other_hhcsts_cj==4 ///
, robust
gen high_low_nw = _b[2.own_hhcsts_cj]
gen high_med_nw = _b[3.own_hhcsts_cj]
gen high_high_nw = _b[4.own_hhcsts_cj]


local lw1="*2.5"
local lw2="*2.5"
local ms="*.5"

local dropvars="_cons 0.own_cstpth_cj 1.own_cstpth_cj 2.own_cstpth_cj 3.own_cstpth_cj 0.other_cstpth_cj 1.other_cstpth_cj 2.other_cstpth_cj 3.other_cstpth_cj 0.own_mitig_cj_5levels 1.own_mitig_cj_5levels 2.own_mitig_cj_5levels 3.own_mitig_cj_5levels 4.own_mitig_cj_5levels 5.own_mitig_cj_5levels 0.other_mitig_cj_5levels 1.other_mitig_cj_5levels 2.other_mitig_cj_5levels 3.other_mitig_cj_5levels 4.other_mitig_cj_5levels 5.other_mitig_cj_5levels"


* Effects plot
coefplot (mit1_nw, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(ebblue*.85) ciopts(lcolor(ebblue*.5 ebblue*.5) lwidth(`lw1' `lw2'))) ///
(mit2_nw, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(purple*.85) ciopts(lcolor(purple*.5 purple*.5) lwidth(`lw1' `lw2'))) ///
(mit3_nw, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(red*.85) ciopts(lcolor(red*.5 red*.5) lwidth(`lw1' `lw2'))) ///
(mit4_nw, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(orange*.85) ciopts(lcolor(orange*.5 orange*.5) lwidth(`lw1' `lw2'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(order(2 "Very Low" 4 "Low" 6 "High" 8 "Very High") rows(1) ///
subtitle("Cost Level: Other")) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small)) ///
addplot(line @at @b if @b == low_low_nw | @b == high_low_nw, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_med_nw | @b == high_med_nw, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_high_nw | @b == high_high_nw, ///
lcolor(dknavy*.8) lpattern(shortdash)) ///
note("(a) Effects of Own Cost, Conditional on Other Costs") ///
name(SuppFig8a)

* Supplementary Figure 9a (by country)

* US
eststo mit1_us: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==1 & country == 1 ///
,robust
gen low_low_us = _b[2.own_hhcsts_cj]
gen low_med_us = _b[3.own_hhcsts_cj]
gen low_high_us = _b[4.own_hhcsts_cj]

eststo mit2_us: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==2 & country == 1 ///
, robust

eststo mit3_us: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==3 & country == 1 ///
, robust

eststo mit4_us: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==4 & country == 1 ///
, robust
gen high_low_us = _b[2.own_hhcsts_cj]
gen high_med_us = _b[3.own_hhcsts_cj]
gen high_high_us = _b[4.own_hhcsts_cj]

coefplot (mit1_us, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(ebblue*.85) ciopts(lcolor(ebblue*.5 ebblue*.5) lwidth(`lw1' `lw2'))) ///
(mit2_us, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(purple*.85) ciopts(lcolor(purple*.5 purple*.5) lwidth(`lw1' `lw2'))) ///
(mit3_us, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(red*.85) ciopts(lcolor(red*.5 red*.5) lwidth(`lw1' `lw2'))) ///
(mit4_us, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(orange*.85) ciopts(lcolor(orange*.5 orange*.5) lwidth(`lw1' `lw2'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(order(2 "Very Low" 4 "Low" 6 "High" 8 "Very High") rows(1) ///
subtitle("Cost Level: Other")) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small)) ///
addplot(line @at @b if @b == low_low_us | @b == high_low_us, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_med_us | @b == high_med_us, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_high_us | @b == high_high_us, ///
lcolor(dknavy*.8) lpattern(shortdash)) ///
name(ia_USw)

* UK
eststo mit1_uk: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==1 & country == 2 ///
,robust
gen low_low_uk = _b[2.own_hhcsts_cj]
gen low_med_uk = _b[3.own_hhcsts_cj]
gen low_high_uk = _b[4.own_hhcsts_cj]

eststo mit2_uk: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==2 & country == 2 ///
, robust

eststo mit3_uk: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==3 & country == 2 ///
, robust

eststo mit4_uk: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==4 & country == 2 ///
, robust
gen high_low_uk = _b[2.own_hhcsts_cj]
gen high_med_uk = _b[3.own_hhcsts_cj]
gen high_high_uk = _b[4.own_hhcsts_cj]

coefplot (mit1_uk, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(ebblue*.85) ciopts(lcolor(ebblue*.5 ebblue*.5) lwidth(`lw1' `lw2'))) ///
(mit2_uk, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(purple*.85) ciopts(lcolor(purple*.5 purple*.5) lwidth(`lw1' `lw2'))) ///
(mit3_uk, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(red*.85) ciopts(lcolor(red*.5 red*.5) lwidth(`lw1' `lw2'))) ///
(mit4_uk, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(orange*.85) ciopts(lcolor(orange*.5 orange*.5) lwidth(`lw1' `lw2'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(order(2 "Very Low" 4 "Low" 6 "High" 8 "Very High") rows(1) ///
subtitle("Cost Level: Other")) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small)) ///
addplot(line @at @b if @b == low_low_uk | @b == high_low_uk, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_med_uk | @b == high_med_uk, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_high_uk | @b == high_high_uk, ///
lcolor(dknavy*.8) lpattern(shortdash)) ///
name(ia_UKw)


* Germany
eststo mit1_ge: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==1 & country == 3 ///
,robust
gen low_low_ge = _b[2.own_hhcsts_cj]
gen low_med_ge = _b[3.own_hhcsts_cj]
gen low_high_ge = _b[4.own_hhcsts_cj]

eststo mit2_ge: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==2 & country == 3 ///
, robust

eststo mit3_ge: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==3 & country == 3 ///
, robust

eststo mit4_ge: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==4 & country == 3 ///
, robust
gen high_low_ge = _b[2.own_hhcsts_cj]
gen high_med_ge = _b[3.own_hhcsts_cj]
gen high_high_ge = _b[4.own_hhcsts_cj]

coefplot (mit1_ge, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(ebblue*.85) ciopts(lcolor(ebblue*.5 ebblue*.5) lwidth(`lw1' `lw2'))) ///
(mit2_ge, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(purple*.85) ciopts(lcolor(purple*.5 purple*.5) lwidth(`lw1' `lw2'))) ///
(mit3_ge, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(red*.85) ciopts(lcolor(red*.5 red*.5) lwidth(`lw1' `lw2'))) ///
(mit4_ge, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(orange*.85) ciopts(lcolor(orange*.5 orange*.5) lwidth(`lw1' `lw2'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(order(2 "Very Low" 4 "Low" 6 "High" 8 "Very High") rows(1) ///
subtitle("Cost Level: Other")) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small)) ///
addplot(line @at @b if @b == low_low_ge | @b == high_low_ge, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_med_ge | @b == high_med_ge, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_high_ge | @b == high_high_ge, ///
lcolor(dknavy*.8) lpattern(shortdash)) ///
name(ia_GEw)


* France
eststo mit1_fr: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==1 & country == 4 ///
,robust
gen low_low_fr = _b[2.own_hhcsts_cj]
gen low_med_fr = _b[3.own_hhcsts_cj]
gen low_high_fr = _b[4.own_hhcsts_cj]

eststo mit2_fr: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==2 & country == 4 ///
, robust

eststo mit3_fr: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==3 & country == 4 ///
, robust

eststo mit4_fr: regress choice_cj100 i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if other_hhcsts_cj==4 & country == 4 ///
, robust
gen high_low_fr = _b[2.own_hhcsts_cj]
gen high_med_fr = _b[3.own_hhcsts_cj]
gen high_high_fr = _b[4.own_hhcsts_cj]

coefplot (mit1_fr, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(ebblue*.85) ciopts(lcolor(ebblue*.5 ebblue*.5) lwidth(`lw1' `lw2'))) ///
(mit2_fr, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(purple*.85) ciopts(lcolor(purple*.5 purple*.5) lwidth(`lw1' `lw2'))) ///
(mit3_fr, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(red*.85) ciopts(lcolor(red*.5 red*.5) lwidth(`lw1' `lw2'))) ///
(mit4_fr, ///
drop(`dropvars') ///
levels(95) msize(`ms') mcolor(orange*.85) ciopts(lcolor(orange*.5 orange*.5) lwidth(`lw1' `lw2'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(order(2 "Very Low" 4 "Low" 6 "High" 8 "Very High") rows(1) ///
subtitle("Cost Level: Other")) ///
xtitle("Change in Pr(Policy Chosen) in percentage points", size(small)) ///
addplot(line @at @b if @b == low_low_fr | @b == high_low_fr, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_med_fr | @b == high_med_fr, ///
lcolor(dknavy*.8) lpattern(shortdash) ///
|| line @at @b if @b == low_high_fr | @b == high_high_fr, ///
lcolor(dknavy*.8) lpattern(shortdash)) ///
name(ia_FRw)

graph combine ia_USw ia_UKw ia_GEw ia_FRw, rows(2) altshrink graphregion(margin(zero) fcolor(white)) ///
note("(a) Effects of Own Cost, Conditional on Other Costs", pos(6)) ///
name(SuppFig9a)

*=============================================================================

*** Difference effect own cost by other cost

* Figure 4b

eststo d1: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj##i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
,robust

local lw1="*3"
local lw2="*3"
local ms="*1"

local dropvars2="1.own_hhcsts_cj 2.own_hhcsts_cj 3.own_hhcsts_cj 4.own_hhcsts_cj 1.other_hhcsts_cj 2.other_hhcsts_cj 3.other_hhcsts_cj 4.other_hhcsts_cj 1.own_hhcsts_cj#2.other_hhcsts_cj 1.own_hhcsts_cj#3.other_hhcsts_cj 1.own_hhcsts_cj#4.other_hhcsts_cj 2.own_hhcsts_cj#2.other_hhcsts_cj 2.own_hhcsts_cj#1.other_hhcsts_cj 3.own_hhcsts_cj#1.other_hhcsts_cj 4.own_hhcsts_cj#1.other_hhcsts_cj 2.own_hhcsts_cj#3.other_hhcsts_cj 3.own_hhcsts_cj#2.other_hhcsts_cj 3.own_hhcsts_cj#3.other_hhcsts_cj 4.own_hhcsts_cj#2.other_hhcsts_cj 4.own_hhcsts_cj#3.other_hhcsts_cj"

coefplot (d1, ///
drop(`dropvars' `dropvars2') ///
levels(95) msize(`ms') mcolor(navy*.9) ciopts(lcolor(navy*.5) lwidth(`lw1'))), ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
xtitle("Difference in Change in Pr(Policy Chosen) in percentage points", size(small)) ///
ylabel(1 "€28, €39, £15, $53" 2 "€56, €77, £30, $107" 3 "€113, €154, £60, $213" 4 "€141, €193, £75, $267") ///
name(Fig4b)


* Supplementary Figure 8b (unweighted version)

eststo d1: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj##i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
,robust

local dropvars2="1.own_hhcsts_cj 2.own_hhcsts_cj 3.own_hhcsts_cj 4.own_hhcsts_cj 1.other_hhcsts_cj 2.other_hhcsts_cj 3.other_hhcsts_cj 4.other_hhcsts_cj 1.own_hhcsts_cj#2.other_hhcsts_cj 1.own_hhcsts_cj#3.other_hhcsts_cj 1.own_hhcsts_cj#4.other_hhcsts_cj 2.own_hhcsts_cj#2.other_hhcsts_cj 2.own_hhcsts_cj#1.other_hhcsts_cj 3.own_hhcsts_cj#1.other_hhcsts_cj 4.own_hhcsts_cj#1.other_hhcsts_cj 2.own_hhcsts_cj#3.other_hhcsts_cj 3.own_hhcsts_cj#2.other_hhcsts_cj 3.own_hhcsts_cj#3.other_hhcsts_cj 4.own_hhcsts_cj#2.other_hhcsts_cj 4.own_hhcsts_cj#3.other_hhcsts_cj"

coefplot (d1, ///
drop(`dropvars' `dropvars2') ///
levels(95) msize(`ms') mcolor(navy*.9) ciopts(lcolor(navy*.5) lwidth(`lw1'))), ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
xtitle("Difference in Change in Pr(Policy Chosen) in percentage points", size(small)) ///
ylabel(1 "€28, €39, £15, $53" 2 "€56, €77, £30, $107" 3 "€113, €154, £60, $213" 4 "€141, €193, £75, $267") ///
name(SuppFig8b)


* Supplementary Figure 9b (by country)

eststo d1_us: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj##i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 1 ///
,robust

eststo d1_uk: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj##i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 2 ///
,robust

eststo d1_ge: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj##i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 3 ///
,robust

eststo d1_fr: regress choice_cj100 ///
i.own_cstpth_cj i.other_cstpth_cj ///
i.own_hhcsts_cj##i.other_hhcsts_cj ///
i.own_mitig_cj_5levels i.other_mitig_cj_5levels ///
[pweight=mbweight] ///
if country == 4 ///
,robust

local dropvars2="2.own_hhcsts_cj 3.own_hhcsts_cj 4.own_hhcsts_cj 2.other_hhcsts_cj 3.other_hhcsts_cj 4.other_hhcsts_cj 2.own_hhcsts_cj#2.other_hhcsts_cj 2.own_hhcsts_cj#3.other_hhcsts_cj 3.own_hhcsts_cj#2.other_hhcsts_cj 3.own_hhcsts_cj#3.other_hhcsts_cj 4.own_hhcsts_cj#2.other_hhcsts_cj 4.own_hhcsts_cj#3.other_hhcsts_cj"

coefplot (d1_us, ///
drop(`dropvars' `dropvars2') msymbol(T) ///
levels(95) msize(`ms') mcolor(navy*.6) ciopts(lcolor(navy*.5) lwidth(`lw1'))) ///
(d1_uk, ///
drop(`dropvars' `dropvars2') msymbol(D) ///
levels(95) msize(`ms') mcolor(navy*.6) ciopts(lcolor(navy*.5) lwidth(`lw1'))) ///
(d1_ge, ///
drop(`dropvars' `dropvars2') msymbol(O) ///
levels(95) msize(`ms') mcolor(navy*.6) ciopts(lcolor(navy*.5) lwidth(`lw1'))) ///
(d1_fr, ///
drop(`dropvars' `dropvars2') msymbol(S) ///
levels(95) msize(`ms') mcolor(navy*.6) ciopts(lcolor(navy*.5) lwidth(`lw1'))), ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
ytitle("Cost Level: Own") ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=35) lcolor(white)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
xtitle("Difference in Change in Pr(Policy Chosen) in percentage points", size(small)) ///
ylabel(1 "€56, €77, £30, $107" 2 "€113, €154, £60, $213" 3 "€141, €193, £75, $267") ///
legend(order(2 "United States" 4 "United Kingdom" 6 "Germany" 8 "France") rows(1)) ///
name(SuppFig9b)


graph combine Fig4a Fig4b, rows(2) altshrink ///
ysize(9) xsize(6) graphregion(margin(zero) fcolor(white)) ///
note("(b) Difference in Effect of Own Cost if Other Costs Increase from Very Low to Very High", pos(6) size(vsmall)) 
graph export "$output/Fig4.pdf", replace

graph combine SuppFig8a SuppFig8b, rows(2) altshrink ///
ysize(9) xsize(6) graphregion(margin(zero) fcolor(white)) ///
note("(b) Difference in Effect of Own Cost if Other Costs Increase from Very Low to Very High", pos(6) size(vsmall))
graph export "$output/SuppFig8.pdf", replace

graph combine SuppFig9a SuppFig9b, rows(2) altshrink ///
ysize(9) xsize(6) graphregion(margin(zero) fcolor(white)) ///
note("(b) Difference in Effect of Own Cost if Other Costs Increase from Very Low to Very High", pos(6) size(vsmall))
graph export "$output/SuppFig9.pdf", replace


